package com.DongBing.entity;

import com.DongBing.common.valid.AddClass;
import com.DongBing.common.valid.UpdateClass;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 品牌
 *
 * @author ¶­±ù
 * @email 861571118@QQ.com
 * @date 2022-05-16 15:56:01
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@NotNull(message = "修改时id不能为空",groups = {UpdateClass.class})
	@Null(message = "新增的时候id必须为空",groups = {AddClass.class})
	@TableId
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(message = "品牌名字必须提交")
	private String name;
	/**
	 * 品牌logo地址   都验证
	 */
	@URL(groups = {AddClass.class,UpdateClass.class})
	private String logo;
	/**
	 * 介绍
	 */
	@NotBlank
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	@NotBlank
	private String firstLetter;
	/**
	 * 排序
	 */
	private Integer sort;

}
